package com.meituan.sdk.model.ddzhkh.shangpin.productDealgroupUpdatestock;

import com.meituan.sdk.annotations.ApiMeta;
import com.google.gson.reflect.TypeToken;
import javax.validation.constraints.NotBlank;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;

/**
* 修改团单库存
* This file was automatically generated.
*/
@ApiMeta(
    path = "/ddzhkh/shangpin/dealgroup/updatestock",
    businessId = 59,
    apiVersion = "10091",
    apiName = "product_dealgroup_updatestock",
    needAuth = true
)
public class ProductDealgroupUpdatestockRequest implements MeituanRequest<ProductDealgroupUpdatestockResponse> {
    /**
    * <p data-diff-id="ct-diff-id-096f0723-d435-4c7c-a680-7c24ac390fcd"><span style="color: ">来源</span></p>
    */
    @NotBlank(message = "source不能为空")
    @SerializedName("source")
    private String source;
    /**
    * <p data-diff-id="ct-diff-id-11e0cbf1-9db2-466d-abb3-a9a5a2e10819"><span style="color: ">团单ID</span></p>
    */
    @SerializedName("dealGroupId")
    private Integer dealGroupId;
    /**
    * <p data-diff-id="ct-diff-id-21568e78-12ef-448a-88b8-8d899a054c01"><span style="color: ">库存</span></p>
    */
    @NotNull(message = "stock不能为空")
    @SerializedName("stock")
    private Integer stock;
    /**
    * <p data-diff-id="ct-diff-id-30a729d6-2127-46d5-af81-cd4735f8b7c4">团单id 推荐使用该字段</p>
    */
    @SerializedName("longDealGroupId")
    private Long longDealGroupId;

    public String getSource() {
        return source;
    }
    public void setSource(String source) {
        this.source = source;
    }
    public Integer getDealGroupId() {
        return dealGroupId;
    }
    public void setDealGroupId(Integer dealGroupId) {
        this.dealGroupId = dealGroupId;
    }
    public Integer getStock() {
        return stock;
    }
    public void setStock(Integer stock) {
        this.stock = stock;
    }
    public Long getLongDealGroupId() {
        return longDealGroupId;
    }
    public void setLongDealGroupId(Long longDealGroupId) {
        this.longDealGroupId = longDealGroupId;
    }


    @Override
    public MeituanResponse<ProductDealgroupUpdatestockResponse> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<ProductDealgroupUpdatestockResponse>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "ProductDealgroupUpdatestockRequest{" + "source=" + source + "," + "dealGroupId=" + dealGroupId + "," + "stock=" + stock + "," + "longDealGroupId=" + longDealGroupId + "}";
    }
}
